package com.wavefront.mtl.parser.line;

import com.wavefront.mtl.elements.RGB;
import com.wavefront.obj.parser.LineParser;
import com.wavefront.obj.parser.MtlParser;

public class TrParser extends LineParser {

	RGB transmissionRGB;

	@Override
	public void parse(String[] words) {
		super.parse(words);
		transmissionRGB = new RGB();
		try {
			transmissionRGB.setR(Float.parseFloat(words[1]));
			transmissionRGB.setG(Float.parseFloat(words[2]));
			transmissionRGB.setB(Float.parseFloat(words[3]));
			MtlParser.currentMaterial.setTransmission(transmissionRGB);
		} catch (Exception e) {
			throw new RuntimeException("KdParser Error");
		}
	}

}
